/**
 * 登陆
 * WangPeixi
 */
window.onload = function(){
var oInput = $("#loginName");
	oInput.focus();
}
function userLogin(){
	 var loginName = $("#loginName").val();
	 var pwd =$("#pwd").val();
	 if(loginName.length < 1 || pwd.length < 1){
		 alert('用户名或密码不能为空');
	 }else{
		 $.post("/userLogin",{"linkman":loginName,"pwd":pwd},function(msg){
			 if(msg.indexOf("view")>0){
					window.location= msg; 
				}else{
					alert(msg); 
				}	
		 });
	 }
}


function returnKey() {
	if(event.keyCode == 13){
		userLogin();
	}
}
